#include <ctime>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;

int throw_level = 0;
void f(int level, string str)
{
    if( level == throw_level){
        throw level;
    }
    else{
        f(level+1, str);
    }
}
int main(int argc, char* argv[])
{
    clock_t start = clock();
    try{
        string str("String Object. ");
        throw_level = argc > 2 ? 0:atoi(argv[1]);
        if( throw_level == 0){
            throw 0;
        }
        else{
            f(1,str);
        }
    }
    catch(int e){
        cout << e << endl;
    }
    clock_t end = clock();
    cout << "Time usded: " << end - start << std::endl;
    
}
